<div class='fui-page fui-page-current member-log-page'>
    <div class='fui-content' >
		<div class="fui-tab fui-tab-success">
			<a ng-class="{'active':pagedata.params.type==0}" class="external" href="javascript:;" ng-click="pagedata.params.type=0;tool.get_list('/online.log/list/',true)">问诊中</a>
			<a ng-class="{'active':pagedata.params.type==1}" class="external" href="javascript:;" ng-click="pagedata.params.type=1;tool.get_list('/online.log/list/',true)">已结束</a>
			<a ng-class="{'active':pagedata.params.type==2}" class="external" href="javascript:;" ng-click="pagedata.params.type=2;tool.get_list('/online.log/list/',true)">待支付</a>
		</div>
        <div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
            <i class='fa fa-comment-o'></i><br/>暂时没有任何在线记录!
        </div>
        <div class='fui-list-group container' ng-show="pagedata.list.length>0" >
			<div class="fui-list goods-item" ng-repeat="item in pagedata.list">
				<div class="fui-list-inner">
					<div class='title'>
						<span ng-show="item.is_add==1" class="label label-success">{{item.is_addtitle}}</span>
						<span ng-show="item.is_add!=1" class="label label-danger">{{item.is_addtitle}}</span>
						<span class="red" style="margin-left:0.3rem">￥{{item.fee}}</span>
					</div>
					<div class='gray'>{{item.createtime}}</div>
				</div>
				<div class='fui-list-angle'>
					<span ng-show="pagedata.params.type==0" ng-click="access_json('/online.index//id='+item.worker_id)" class='btn btn-sm btn-info'>前往咨询</span>
					<span ng-show="pagedata.params.type==1" class='btn btn-sm btn-gray'>已结束</span>
					<span ng-show="pagedata.params.type==2" ng-click="pagedata.pay_submit(item.id)" class='btn btn-sm btn-info'>立即支付</span>
				</div>
			</div>
		</div>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav')"></div>
<script>
scope.tool.get_list('/online.log/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('/online.log/list/');
}
scope.pagedata.pay_submit=function(id){
	scope.post_json('/online.log/pay/id='+id,{},function(pay_id){
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message(res.message,'success','/online.log/');
				}else{
					scope.message(res.message,'success','/online.log/');
				}
		},'','','/online.log/','/online.log/');
	});
}
</script>